﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HZ.MBSM.DBUtility;
public partial class Bidder_PurchaseDeal_detail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string strSql, BuyPlanId="", buystate;
        System.Collections.Generic.List<HZ.MBSM.DAL.AccountType> _AccountType = new System.Collections.Generic.List<HZ.MBSM.DAL.AccountType>();
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumCompany);
        if (HZ.MBSM.BLL.Login.CheckAssert(_AccountType))
        {
            HZ.MBSM.Model.Account _Account = (HZ.MBSM.Model.Account)Session["Account"];
    
            LabHospital.Text = _Account.DWName;
            if (!IsPostBack)
            {
                BuyPlanId = SysFun.IsSQL(SysFun.ToTrim(Request.QueryString["BuyPlanId"]));
                Db db = new Db();
                System.Data.IDataReader dr;
                strSql = "select * from PurchasePlan where BuyPlanId=" + BuyPlanId ;
                dr = db.DataReader(strSql);
                if (dr.Read())
                {
                    txtStartTime.Text = Convert.ToDateTime(dr["StartTime"]).ToShortDateString();
                    txtEndTime.Text = Convert.ToDateTime(dr["EndTime"]).ToShortDateString();
                    txtPlanName.Text = SysFun.ToTrim(dr["PlanName"]);
                    rdoBuyStatus.SelectedValue = SysFun.ToTrim(dr["BuyStatus"]);
                    txtRemarks.Text = SysFun.ToTrim(dr["Remarks"]);
                    buystate = SysFun.ToTrim(dr["BuyStatus"]);
                    TextLname.Text = SysFun.ToTrim(dr["RelationMen"]);
                    TextPhote.Text = SysFun.ToTrim(dr["RelationPhone"]);
                    TextJName.Text = SysFun.ToTrim(dr["ConstructMen"]);
                }
                dr.Close();
                dr.Dispose();
                db.Close();




            }

        }
    }
}
